<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>简单博客系统</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
<!-- 登录部分 -->
<div id="login-section">
    <h2>登录</h2>
    <form id="login-form">
        <label for="username">用户名:</label>
        <input type="text" id="username" name="username" required />
        <label for="password">密码:</label>
        <input type="password" id="password" name="password" required />
        <button type="submit">登录</button>
    </form>
    <p id="login-error" style="color: red;"></p>
</div>

<!-- 博客部分 -->
<div id="blog-section" style="display: none;">
    <h2>发布博客</h2>
    <form id="upload-blog-form">
        <label for="title">标题:</label>
        <input type="text" id="title" name="title" required />
        <label for="content">内容:</label>
        <textarea id="content" name="content" rows="10" required></textarea>
        <button type="submit">发布</button>
    </form>
    <p id="upload-error" style="color: red;"></p>

    <h2>博客列表</h2>
    <ul id="blogs"></ul>
</div>

<script src="script.js"></script>
</body>
</html>